Event Condition Action (ECA) is an example of a rules-based approach used in an event driven system. Typically, the ECA rule includes an event part for specifying what triggers the invocation of the ECA rule, a condition part, which is a logical test that, if satisfied to true, causes the action to be carried out, and an action part, which includes updates or invocations on the local data at the database. In a database system, the condition could simply be a query to the database, with the result set being passed to the action part. Actions could also be calls to external programs or remote procedures. ECA rules can be used for activities such as automatically enforcing document constraints, maintaining repository statistics, facilitating publish/subscribe applications, and executing business processes.